package com.example.utils;


public enum ResultEnum implements CodeEnum{
    //这里是可以自己定义的，方便与前端交互即可
    UNKNOWN_ERROR(-1,"未知错误"),
    SUCCESS(0,"成功"),
    USER_NOT_EXIST(1,"用户不存在"),
    USER_IS_EXISTS(2,"用户已存在"),
    DATA_IS_NULL(3,"数据为空"),
    LOGIN_FAILS(4,"登陆失败"),
    ERROR(404,"服务器繁忙，请稍候"),
    IMPORT_ERROR(11,"导入失败出现异常"),
    TOWLEVEL_EXIST(12,"存在二级标题"),
    SAVE_COURSE_FALSE(13,"保存课程失败"),
    COURSE_NOT_EXIST(14,"课程信息不存在"),
    UPDATE_COURSE_FALSE(15,"修改课程失败"),
    DELETE_CHAPTER_FALSE(16,"删除章节失败"),
    UP_VIDEO_FALSE(17,"上传视频失败"),
    ENCODE_URL_FALSE(18,"URL地址编码失败"),
    GET_ACCESS_TOKEN_FALSE (19, "获取access_token失败"),
    GET_USERINFO_FALSE(20, "获取用户信息失败"),
    MOBILE_EXIST(21, "该手机号已存在"),
    USER_NO_EXIST(22,"用户名或密码错误"),
    JWT_TIME_OVER(23,"JWT令牌过期"),
    ;
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
